import request from '@/utils/request'
export default {
  // 查询所有的讲师
  list() {
    return request({
      url: '/admin/edu/teacher/list',
      method: 'get'
    })
  },
  // 分页查询所有讲师
  pagelist(pageNum, pageSize, searchObj) {
    return request({
      url: `/admin/edu/teacher/selectAll/${pageNum}/${pageSize}`,
      method: 'get',
      params: searchObj
    })
  },
  // 删除指定讲师
  deleteById(id) {
    return request({
      url: `/admin/edu/teacher/deleteById/${id}`,
      method: 'delete'
    })
  },
  // 添加讲师
  addTeacher(teacher) {
    return request({
      url: '/admin/edu/teacher/insert',
      method: 'post',
      data: teacher
    })
  },
  // 查询指定id的讲师
  getTeacherById(id) {
    return request({
      url: `/admin/edu/teacher/selectById/${id}`,
      method: 'get'
    })
  },
  // 根据Id列表删除讲师
  deleteByIds(ids) {
    return request({
      url: '/admin/edu/teacher/deleteByIds',
      method: 'delete',
      data: ids
    })
  },
  // 更新讲师
  updatedTeacher(teacher) {
    return request({
      url: '/admin/edu/teacher/update',
      method: 'put',
      data: teacher
    })
  }

}
